package com.yjh.pojo.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.LocalDateTime;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class Message {
    @TableId(type = IdType.AUTO)
    private Integer msgId;

    @TableField("user_id") // 外键，关联用户表
    private Integer userId;

    @TableField("msg_type")
    private Integer msgType; // 0=系统通知，1=预约提醒，2=违规通知

    @TableField("msg_title")
    private String msgTitle;

    @TableField("msg_content")
    private String msgContent;

    @TableField("is_read")
    private Integer isRead; // 0=未读，1=已读

    @TableField(value = "create_time", fill = FieldFill.INSERT)
    private LocalDateTime createTime;
}
